import requests
from bs4 import BeautifulSoup

data = {
    'form_email':'email@163.com',
    'form_password':'password',
    'login':'登录',
    'source':'index_nav',
    'redir':'https://www.douban.com/',
}

url = 'https://accounts.douban.com/login'
header = {
    'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0',
}

s = requests.Session()
d = s.post(url, headers=header, data=data)
print(d.status_code)
r = s.get('https://www.douban.com', headers=header)
print(r.text)
